<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.7.1.min.js"></script>
</head>
<body>

<div id="div1">测试div元素</div>

<!--<div>
    <span>abc</span>
    <span>abc</span>
    <span>abc</span>
    <span>abc</span>
    <span>abc</span>
    <span>abc</span>
</div>-->


<table>
    <tr>
        <td>XXXXXX</td>
        <td>XXXXXX</td>
        <td>XXXXXX</td>
        <td>XXXXXX</td>
    </tr>
    <tr>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
    </tr>
    <tr>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
        <td>123456</td>
    </tr>
</table>
<script>
    var $tr = $("td:first").closest('tr');
    $tr.remove();
    // console.log($tr.get(0));
    // console.log();
    // $("#div1").wrap("<p id='pele'></p>")

    // $('div:last').empty();

    // $("#div1").remove();

    // console.log($("#div1").text());
    // $("#div1").text('新的div文本元素');
    // $("#div1").text('<span>添加新span</span>');

    // console.log($("#div1").html());
    // $("#div1").html("新的div内容");

    // $("#div1").html('<span>添加新span</span>');


    // $("#div1").append('<span>添加新span</span>');
    // $("#div1").prepend('<span>添加新span</span>');
    // $("#div1").after('<span>添加新span</span>');
    // $("#div1").before('<span>添加新span</span>');
</script>
</body>
</html>